import os

for file in os.listdir("."):
    if not file.endswith(".go"):
        continue
    name, ext = os.path.splitext(file)
    cmd = rf"..\..\tools\asty.exe go2json -input {file} -output {name}.json -indent 2 -positions true"

    os.system(cmd)
